An overlay network is a computer network established over another network. -Network nodes in the overlay network are connected by using virtual or logical links, which correspond to paths, and these paths may be connected on an underlay network by using multiple physical links. For example, a cloud computing network, a peer-to-peer network, and the like are overlay networks running over the Internet. The Internet is an overlay network initially established over a conventional telephony network. A Voice over Internet Protocol (VoIP) network that appears later is an overlay network established over the Internet.
Currently, an Internet protocol (IP) network bears a large quantity of different types of services, such as a video on-live service, a video on demand service, a VoIP service, and an online game service. Different services have different requirements on a network, for example, the online game service is most sensitive to a network delay, the video on-live service is most sensitive to network packet loss, and the video on demand service has a highest requirement on a network bandwidth. A shortest path or a lowest-cost path is obtained through routing calculation by using a conventional routing protocol such as Intermediate System to Intermediate System (IS-IS) or Open Shortest Path First (OSPF). However, most of the time, the shortest path or the lowest-cost path is not a preferable route meeting a network requirement of a service.
According to a current software defined networking (SDN) technology emerging in the industry, for example, OpenFlow, a large quantity of flow tables are generated by using a centralized control plane and are delivered to a network device that supports OpenFlow. For generation of these flow tables, particular flow tables may be generated according to different network requirements of services. However, in an existing network, a network device has large traffic and various types of services; therefore, the network device supporting OpenFlow needs an excessively large quantity of flow tables, which leads to a high requirement on storage performance of the network device; moreover, it takes a lot of time to search a flow table, thereby affecting execution efficiency of routing.